package oop第二章作业;
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import java.util.Scanner;
public class IntFloatDouble {
    public void IntFloatDouble (int number11){
        if (number11>=0){
            System.out.println(number11);
        }else {
            System.out.println(number11*(-1));
        }
    }
    public void IntFloatDouble (  float number12){
        if (number12>=0){
            System.out.println(number12);
        }else {
            System.out.println(number12*(-1.0));
        }
    }
    public void IntFloatDouble ( double number13){
        if (number13>=0){
            System.out.println(number13);
        }else {
            System.out.println(number13*(-1.00));
        }
    }
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        int s;
        Float n;
        double m;

        IntFloatDouble number=new IntFloatDouble();
        System.out.println("请输入一个数");
         s=scanner.nextInt();
        number.IntFloatDouble(s);

        IntFloatDouble number1=new IntFloatDouble();
        System.out.println("请输入一个数");
        n=scanner.nextFloat();
        number1.IntFloatDouble(n);

        IntFloatDouble number2=new IntFloatDouble();
        System.out.println("请输入一个数");
        m=scanner.nextDouble();
        number2.IntFloatDouble(m);
    }
}
